<style>
	table{
		width:600px;
		text-align:center;
		border-collapse:collapse;
	}
	table tr td{
		height:45px;
		border:1px solid #999;
	}
	textarea{
		height:100px;
		width:400px;
		resize:none;
	}
</style>
<form action="/index.php/Admin/Goods/updateck" method="POST" enctype="multipart/form-data">
	<table>
		<tr>
			<td colspan="2">
				添加商品
				<input type="hidden" name="id" value="<?php echo $id ?>">
			</td>
		</tr>
		<tr>
			<td>商品名</td>
			<td>
				<input type="text" name='name' value="<?php echo $goodsData['name'] ?>">
			</td>
		</tr>
		<tr>
			<td>商品编号</td>
			<td>
				<input type="text" name='gid' value="<?php echo $goodsData['gid'] ?>">
			</td>
		</tr>
		<tr>
			<td>分类</td>
			<td>
				<select name='cid'>
<?php
	foreach ($cateData as $val):
?>
					<option value="<?php echo $val['id']?>" <?php if($val['id']==$goodsData['cid']) echo 'selected'; ?>><?php echo $val['name'] ?></option>
<?php
	endforeach;
?>
				</select>
			</td>
		</tr>
		<tr>
			<td>品牌</td>
			<td>
				<select name='bid'>
<?php
	foreach ($brandData as $val):
?>
					<option value="<?php echo $val['id']?>" <?php if($val['id']==$goodsData['bid']) echo 'selected'; ?> ><?php echo $val['name'] ?></option>
<?php
	endforeach;
?>
				</select>
			</td>
		</tr>
		<tr>
			<td>市场价</td>
			<td>
				<input type="text" name='market' value="<?php echo $goodsData['market'] ?>">
			</td>
		</tr>
		<tr>
			<td>本店价</td>
			<td>
				<input type="text" name='price' value="<?php echo $goodsData['price'] ?>">
			</td>
		</tr>
		<tr>
			<td>积分</td>
			<td>
				<input type="text" name='score' value="<?php echo $goodsData['score'] ?>">
			</td>
		</tr>
		<tr>
			<td>描述</td>
			<td>
				<textarea name='brief'><?php echo $goodsData['brief'] ?></textarea>
			</td>
		</tr>
		<tr>
			<td>图片地址</td>
			<td>
				<input type="text" name='photo' value="<?php echo $goodsData['photo'] ?>">
			</td>
		</tr>
		<tr>
			<td colspan="2">
				<input type="hidden" name='id' value="<?php echo $goodsData['id'] ?>">
				<input type="hidden" name="sales" value="0">
				<input type='submit' value="修改" />
			</td>
		</tr>
	</table>
</form>